<?php

class ValidateUserCount extends Zend_Validate_Abstract{

    
     
    
    public function isValid(){
    $gameType = $this->explicitCatanTypeMapper->find($value->getParam('gameType'), new Application_Model_ExplicitCatanTypeModel);
        $numbers = $gameType->getPlayers();
        $numbers = split('[;]', $numbers);
        $countUser = $value->getParam('user');
        $countUser = count($countUser);
        if ($numbers != null) {
            foreach ($numbers as $n) {
                if ($n == $countUser)
                    return TRUE;
            }
        }
        $this->_error("falsche Anzahl");
        return FALSE;     
     }
    
    
}

?>